package com.qh.book.dataobj;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.qh.book.enums.ImgsStatusEnum;
import com.qh.book.utils.EnumUtil;

/**
 * 
 * @author qihong
 * @date 2017年10月8日 上午10:46:00 
 * @Description: 移动端首页轮播图
 */
@Entity
@Table(name = "homeimgs")
public class HomeImgs {

	@Id
	private Integer id;
	
	
	private String title;
	
	/**图片地址*/
	private String imgurl;
	
	/**链接地址*/
	private String link;
	
	/**是否启用*/
	private Integer show;
	
	
	/**上传时间*/
	private Date createTime;
	
	
	
	
	

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getShow() {
		return show;
	}

	public void setShow(Integer show) {
		this.show = show;
	}



	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getImgurl() {
		return imgurl;
	}

	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}
	

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}
	
	@JsonIgnore
	public ImgsStatusEnum getImgsStatusEnum() {
	
		return EnumUtil.getByCode(show, ImgsStatusEnum.class);
		
	}
	
	
	
}
